import {
	defineStore
} from 'pinia';
import http from '../common/request'
export default defineStore('companyStore', {
	state: () => {
		return {
			companyList: []
		}
	},
	actions: {
		loadCompany() {
			return new Promise((resolve, reject) => {
				http({
					url: "/company/list",
					methods: "GET"
				}).then(res => {
					this.companyList = res
					resolve(res)
				}).catch((err) => {
					reject(err)
				})
			})
		}
	}
})